package com.changdu.seatunnel.admin.config.common;

import lombok.Data;

@Data
public class RequestContext {

    private final static ThreadLocal<RequestContext> HOLDER = new ThreadLocal<>();

    private String accessToken;

    public static RequestContext get() {
        return HOLDER.get();
    }

    public static void set(RequestContext context) {
        HOLDER.set(context);
    }

    /**
     * 清理 ThreadLocal
     */
    public static void remove() {
        HOLDER.remove();
    }

}
